import java.io.IOException;

import javax.imageio.ImageIO;


public class BirdColibris extends Bird {

	private static final int COLIBRIS_SPEED = 8;
	private static final int COLIBRIS_TIME = 10;
	private static final int COLIBIS_IMAGE_WIDTH = 20;
	private static final int COLIBRIS_IMAGE_HEIGHT = 20;
	private static final int COLIBRIS_BIRD_TYPE = 1;

	public BirdColibris(){
		super(COLIBRIS_BIRD_TYPE); 
		this.imageWidth = COLIBIS_IMAGE_WIDTH;
		imageHeight = COLIBRIS_IMAGE_HEIGHT;
		speed = COLIBRIS_SPEED;
		time = COLIBRIS_TIME;
		this.loadRessource();
	}

	public void 	loadRessource() {
		try {
			this.imageArray[0] = ImageIO.read((getClass().getResource("Ressources/bird_colibris_droit.png")));
			this.imageArray[1] = ImageIO.read((getClass().getResource("Ressources/bird_colibris_gauche.png")));
		} catch (IOException e) {e.printStackTrace();}
		this.currentImage = this.imageArray[1];
	}
	
	public void setSpeedCoef(double d) {
		if(d > 90){ this.speed = this.COLIBRIS_SPEED; System.out.println("caca"); }
		else this.speed = (d/100)*this.COLIBRIS_SPEED;
	}
}
